﻿using Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    /// <summary>
    /// 职工信息表
    /// </summary>
    [Table("B1")]
    public class EM_Employee
    {
        public EM_Employee()
        {
            this.Id = Guid.NewGuid();
            this.WorkingDate = DateTime.Now;
            this.AddTime = DateTime.Now;
        }

        /// <summary>
        /// 数据唯一标识符
        /// </summary>
        [Column("B001")]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Required]
        public Guid Id { get; set; }

        /// <summary>
        /// enum:0：领导   1：党务人员    2：雇员
        /// </summary>
        [Column("B002")]
        [Required]
        public Postion Postion { get; set; }

        /// <summary>
        /// 薪资
        /// </summary>
        [Column("B003")]
        [Required]
        public float Salary { get; set; }

        /// <summary>
        /// 学历:0:中专    1：大专    2:本科      3：研究生
        /// </summary>
        [Column("B004")]
        [Required]
        public Qualification Qualification { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        [Column("B005")]
        [StringLength(50)]
        [Required]
        public string? Director { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        [Column("B006")]
        [StringLength(100)]
        [Required]
        public string? Department { get; set; }

        /// <summary>
        /// 电话号码
        /// </summary>
        [Column("B007")]
        [StringLength(13)]
        [Required]
        public string? Phone { get; set; }

        /// <summary>
        /// 岗位
        /// </summary>
        [Column("B008")]
        [StringLength(50)]
        [Required]
        public string? Post { get; set; }

        /// <summary>
        /// 参加工作日期
        /// </summary>
        [Column("B009")]
        [Required]
        public DateTime WorkingDate { get; set; }

        /// <summary>
        /// 注册时间
        /// </summary>
        [Column("B010")]
        [Required]
        public DateTime AddTime { get; set; }
    }
}
